package com.heaton.videocar.utils;

import android.content.Context;
import android.content.res.TypedArray;

/**
 * author: jerry
 * date: 21-1-15
 * email: superliu0911@gmail.com
 * des:
 */
public class ResourceUtils {
    public static int[] getResIds(Context context, int resId){
        TypedArray array = context.getResources().obtainTypedArray(resId);
        int len = array.length();
        int[] intArray = new int[array.length()];

        for(int i = 0; i < len; i++){
            intArray[i] = array.getResourceId(i, 0);
        }
        array.recycle();
        return intArray;
    }
}
